package com.team.RunsFast_Api.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.team.RunsFast_Api.dto.UserLevelAddressDto;
import com.team.runsfast.entity.UserLevel;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserLevelDao extends BaseMapper<UserLevel> {
    @Select("select ul.level,ul.score,a.* from t_userlevel ul LEFT JOIN t_address a on ul.uid=a.uid and a.flag=1 where ul.uid=#{uid} limit 1")
    UserLevelAddressDto selectAddress(long uid);
}
